package models

type HitInfo struct {
	TypeID    int64 // 1: CCPolicy  2:GroupPolicy
	PolicyID  int64
	VulnName  string
	Action    PolicyAction
	ClientID  string // for CC/Attack Client ID
	TargetURL string // for CAPTCHA redirect
	BlockTime int64
}

type BlockInfo struct {
	Reason string
}

type APIResponseInfo struct {
	Ret  ErrorCodes  `json:"ret"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type ErrorCodes int64

const (
	Success          ErrorCodes = 0
	InvalidParam     ErrorCodes = -1
	ResourceNotFound ErrorCodes = -2
	InvalidAuthority ErrorCodes = -3
	ForbidOperation  ErrorCodes = -4
	SystemError      ErrorCodes = -50
)

type CaptchaContext struct {
	CaptchaId string
	ClientID  string
}
